package unicall.em.models.vo;

import unicall.em.models.SipAccount;
import unicall.em.utils.StringUtil;

public class SipAccountQuery {

    private String clientNumber;
    
    private String agentId;
    
    public SipAccountQuery(){
        
    }

    public String getClientNumber() {
        return clientNumber;
    }

    public void setClientNumber(String clientNumber) {
        this.clientNumber = clientNumber;
    }

    public String getAgentId() {
        return agentId;
    }

    public void setAgentId(String agentId) {
        this.agentId = agentId;
    }
    
    public SipAccountSpec toSpec(){
       SipAccount account = new SipAccount();
        if(!StringUtil.isBlank(this.clientNumber)){
            account.setClientNumber(this.clientNumber);;
        }
        if(!StringUtil.isBlank(this.agentId)){
            account.setAgentId(this.agentId);
        }
        return new SipAccountSpec(account);
    }
    
}
